package com.example.demo.entity;

import com.example.autojob.util.convert.DateUtils;
import com.timing.finder.framework.CacheData;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 要存入缓存的对象实体，实现CacheData接口
 *
 * @author JingGe(* ^ ▽ ^ *)
 * @date 2023-07-17 15:26
 * @email 1158055613@qq.com
 */
@Getter
@Setter
public class TimingDataEntityCacheData implements CacheData {
    private String data1;
    private String data2;
    private String createTime;

    public TimingDataEntityCacheData(String data1, Integer data2, Date createTime) {
        this.data1 = data1;
        this.data2 = data2 + "";
        if (createTime != null) {
            this.createTime = DateUtils.formatDateTime(createTime);
        }
    }
}
